define countr 
proc(l)
    if nullp(l) then
        return := 0
    else
        return := 1 + countr(cdr(l))
    fi
end;
x := 5;
y := 10;
z := 15;
l := [x,y,[1,2,[3,4,5]],z];
n := countr(l)
